/*
* Copyright (C) 2012  lidp.
*
* Contact: lidp <openser@yeah.org>
*	
* This file is part of Open Source Peasant Framework.
*
* Peasant is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*	
* You should have received a copy of the GNU General Public License
* along with Peasant.
*
*/

/**@file pst_config.h
  * system dependent set ,must include this file 
  *
  *@author lidp <openser@yeah.org>
  */

#ifndef __PST_CONFIG_H__
#define __PST_CONFIG_H__


/* Windows (XP/Vista/7/CE and Windows Mobile,WP7) macro definition.
*/
#if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE)
#	define PST_UNDER_WINDOWS	1
#endif

/* Used on Windows and Symbian systems to export/import public functions and global variables.
*/
#if !defined(__GNUC__) && defined(TINYSAK_EXPORTS)
# 	define PST_API		__declspec(dllexport)
#	define PST_GEXTERN	__declspec(dllexport)
#elif !defined(__GNUC__)
# 	define PST_API		__declspec(dllimport)
#	define PST_GEXTERN	__declspec(dllimport)
#else
#	define PST_API
#	define PST_GEXTERN	extern
#endif


#ifdef __cplusplus
	#define PST_BEGIN_EXTERN_C extern "C" {
	#define PST_END_EXTERN_C }
#else
	#define PST_BEGIN_EXTERN_C 
	#define PST_END_EXTERN_C
#endif

#if defined(_MSC_VER)
	#define PST_INLINE	__forceinline
#elif defined(__GNUC__) && !defined(__APPLE__)
	#define PST_INLINE	__inline
#else
	#define PST_INLINE	
#endif


/* Disable some well-known warnings for M$ Visual Studio*/
#ifdef _MSC_VER
	#define _CRT_SECURE_NO_WARNINGS
	#pragma warning( disable : 4996 )
#endif

/*	Features */
#if PST_UNDER_WINDOWS
	#define HAVE_GETTIMEOFDAY				0
#else
	#define HAVE_GETTIMEOFDAY				1
#endif

#if defined(ANDROID)
	#define HAVE_CLOCK_GETTIME	1
#endif

/** common headers */
#include <sys/stat.h>
#include <limits.h>
#include <sys/types.h>
#include <time.h>
#include <signal.h>
#include <errno.h>
#include <stdint.h>
#include <stddef.h>
#include "pst_common.h"


#endif
